DROP TABLE IF EXISTS jms_ods.tab_fee_config;
CREATE EXTERNAL TABLE TAB_FEE_CONFIG(
   id                     bigint  not null  comment '主键ID'  ,
   fee_type               string    comment '费用类型'  ,
   menu                   string    comment '使用菜单'  ,
   start_date           string    comment '启用时间'  ,
   end_date             string    comment '有效结束时间'  ,
   create_time            string    comment '创建日期'  ,
   create_user            string    comment '创建人'  ,
   update_time          string    comment '更新时间'  ,
   update_user          string    comment '更新人'  ,
   status                 tinyin    comment '启用状态 0-禁用,1-启用',
   ten_half_fix_fee       double    comment '10:30固定费用'  ,
   ten_half_target        string    comment '10:30目标值(%)'  ,
   ten_half_one_fine      double    comment '10:30单票罚款金额'  ,
   ten_half_max_fine      double    comment '10:30最高罚款金额'  ,
   ten_half_min_fine      double    comment '10:30最低罚款票数'  ,
   eleven_half_fix_fee    double    comment '11:30固定费用'  ,
   eleven_half_target     string    comment '11:30目标值(%)'  ,
   eleven_half_one_fine   double    comment '11:30单票罚款金额'  ,
   eleven_half_max_fine   double    comment '11:30最高罚款金额'  ,
   eleven_half_min_fine   double    comment '11:30最低罚款票数'  ,
   fourteen_fix_fee       double    comment '14:00固定费用'  ,
   fourteen_target        string    comment '14:00目标值(%)'  ,
   fourteen_one_fine      double    comment '14:00单票罚款金额'  ,
   fourteen_max_fine      double    comment '14:00最高罚款金额'  ,
   fourteen_min_fine      double    comment '14:00最低罚款票数'  ,
   eighteen_fix_fee       double    comment '18:00固定费用'  ,
   eighteen_target        string    comment '18:00目标值(%)'  ,
   eighteen_one_fine      double    comment '18:00单票罚款金额'  ,
   eighteen_max_fine      double    comment '18:00最高罚款金额'  ,
   eighteen_min_fine      double    comment '18:00最低罚款票数'  ,
   twenty_two_fix_fee     double    comment '22:00固定费用'  ,
   twenty_two_target      string    comment '22:00目标值(%)'  ,
   twenty_two_one_fine    double    comment '22:00单票罚款金额'  ,
   twenty_two_max_fine    double    comment '22:00最高罚款金额'  ,
   twenty_two_min_fine    double    comment '22:00最低罚款票数'
   --,max_fee string    comment'最大罚款'
   --,return_target string   comment'返款目标值(%)'
   --,return_proportion string   comment'返款比例(%)'
)
COMMENT  '网点派件监控表'
PARTITIONED BY (dt STRING COMMENT '时间分区')
STORED AS PARQUET
LOCATION '/dw/hive/jms_ods.db/external/tab_fee_config'
TBLPROPERTIES (
    'discover.partitions' = 'false',
    'parquet.column.index.access' = 'true'
    );